# coding=utf-8
class Person():
    __slots__ = {"name", "age"}

    def __init__(self, name, age):
        self.name = name
        self.age = age

    def eat(self):
        print("eat!!!")


if __name__ == '__main__':
    p1 = Person("jhon", 21)
    # p1.gender = "man"
    # AttributeError: 'Person' object has no attribute 'gender'
